Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove empty values after param validation #49

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ganeshrn
Copy link
Member

After the populated config is validated with
module argspec remove the empty values for
rendered facts

After the populated config is validated with
module argspec remove the empty values for
rendered facts
@ansible-zuul
Copy link
Contributor

ansible-zuul bot commented Jun 28, 2019

Build succeeded.

@@ -73,8 +73,10 @@ class {{ resource|capitalize }}Facts(object):
objs.append(obj)
facts = {}
if objs:
facts['{{ resource }}'] = []
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quick question: Would this break for facts with are inherently not a list of items (e.g., lacp)?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By default, the value stored for the fact is a list of dict. In case the fact is not a list item it is converted to list of dict and stored in facts as per the current logic. Adding this line won't change existing behavior.

@NilashishC NilashishC added the gate Gate PR in Zuul CI label Jun 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gate Gate PR in Zuul CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants